<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>DCSGO</title>
</head>
<body>
  <div class="container">
    <!-- 注册 -->
    <div class="register">
      <div class="text">
        <a href="#" onclick="change_login()">已有账号？前往登录>>></a>
        <img src="./login1.jpg" alt="">

      </div>
      <div class="register_form">
        <label for="register_username">用户名</label>
        <input type="text" id="register_username" placeholder="请输入用户名">
        <label for="register_pwd">密码</label>
        <input type="password" id="register_pwd" placeholder="请输入密码">
        <label for="register_pwd1">确认密码</label>
        <input type="password" id="register_pwd1" placeholder="请确保两次输入的密码一致">
        <button>注 册</button>
      </div>
    </div>
    <!-- 登录 -->
    <div class="login">
      <div class="text">
        <a href="#" onclick="change_register()">没有账号？前往注册>>></a>
        <img src="./login1.jpg" alt="">

      </div>
      <div class="login_form">
        <label for="login_username">用户名</label>
        <input type="text" id="login_username" placeholder="请输入用户名">
        <label for="login_pwd">密码</label>
        <input type="password" id="login_pwd" placeholder="请输入密码">
        <button>登 录</button>
      </div>
    </div>
  </div>

  <style>
    *{
      margin: 0px;
      padding: 0px;
    }

    .container{
      /* viewport width 跨平台（电脑、手机、平板）单位 */
      width: 100vw;
      height: 100vh;
    }

    /* .login{
      display: none;
    } */

    .register,.login{
      width: 45%;
      height: 40%;
      border: 3px solid white;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%,-50%);
      border-radius: 8px;
      box-shadow: 8px 8px 8px bisque;
      background-color: orange;
      transition: all 1s linear;
    }

    .register .text,.login .text{
      width: 27%;
      height: 100%;
      border-right: 3px solid beige;
      float: left;
      text-align: center;
    }

    .register .text a,.login .text a{
      text-decoration: none;
      color: rgba(0, 0, 0, 0.4);
      font-size: 20px;
      font-weight: 700;
      display: block;
      margin-top: 10px;
      font-family: 幼圆;
      
    }

    .register .text img,.login .text img{
      width:70%;
      height:70%;
      margin-top: 20px;

    }

    .register_form ,.login_form{
      width: 72%;
      height: 100%;
      /* border-left: 3px solid beige; */
      float: right;
      text-align: center;
      font-family: 黑体;
      font-size: 20px;
      font-weight: 700;
    }

    .register_form label,.login_form label{
      display: inline-block;
      width: 16%;
      height: 35px;
      text-align: center;
    }

    .register_form input,.login_form input{
      width: 75%;
      height: 35px;
      margin-top: 30px;
      outline: none;
      border: 2px solid black;
      padding-left: 5px;
      font-size: 15px;
    }

    .register_form button,.login_form button{
      width: 80px;
      height: 35px;
      margin-top: 30px;
      border-radius: 5px;
      outline: none;
      cursor: pointer;
      background-color: #B97E0D;
      color: black;
      border: none;
      font-family: 黑体;
      font-size: 20px;
      font-weight: 700;
    }
  </style>
  <script type="text/javascript">
    var login=document.getElementsByClassName("login")[0];
    var register=document.getElementsByClassName("register")[0];

    function change_login(){
      login.style.zIndex=66;
      register.style.zIndex=1;
    }

    function change_register(){
      login.style.zIndex=1;
      register.style.zIndex=66;
    }
  </script>
</body>
</html>